import React from "react";
import logo from "./logo.svg";
import { Counter } from "./features/counter/Counter";
import "./App.css";
import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
import My from "./views/my";

const City = React.lazy(() => import("./views/city"));
const Login = React.lazy(() => import("./views/login"));
function App() {
  return (
    <div className="App">
      <BrowserRouter>
        <React.Suspense>
          <Routes>
            <Route path="/login" element={<Login></Login>}></Route>
            <Route path="/my" element={<My></My>}></Route>
            <Route path="/city" element={<City></City>}></Route>
            <Route path="/" element={<Navigate to="/city"></Navigate>}></Route>
          </Routes>
        </React.Suspense>
      </BrowserRouter>
    </div>
  );
}

export default App;
